class ChangeMedialProfileTable < ActiveRecord::Migration
  def self.up
    remove_index :medial_profiles, :user_id
    drop_table :medial_profiles
    
    create_table :medial_profiles do |t|
      t.column :user_id, :integer
      t.column :service_count, :text
      
      t.column :full_name, :text
      t.column :first_name, :text
      t.column :last_name, :text
      
      t.column :gender, :text
      t.column :lang, :text
      t.column :age, :text
      t.column :rel_status, :text
      t.column :email, :text
      
      t.column :occupation, :text
      t.column :role, :text
      
      t.column :locality, :text
      t.column :state, :text
      t.column :country, :text
      t.column :locale_country, :text
      
      t.column :full_hometown, :text
      t.column :full_locations, :text
      
      t.column :last_update, :datetime
      #t.timestamps
    end
    add_index :medial_profiles, :user_id
  end
  
  def self.down
    remove_index :medial_profiles, :user_id
    drop_table :medial_profiles
    
    create_table :medial_profiles do |t|
      t.column :user_id, :integer
      t.column :service_count, :integer
      
      t.column :full_name, :string
      t.column :first_name, :string
      t.column :last_name, :string
      
      t.column :gender, :string
      t.column :age, :integer
      t.column :rel_status, :string
      t.column :email, :string
      
      t.column :occupation, :string
      t.column :role, :string
      
      t.column :locality, :string
      t.column :state, :string
      t.column :country, :string
      t.column :locale_country, :string
      
      t.column :full_hometown, :string
      t.column :full_hometown, :string
      
      t.column :last_update, :datetime
      #t.timestamps
    end
    add_index :medial_profiles, :user_id
    
  end
end
